<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Vue demo10(条件渲染)</title>
    <script src="../build/vue.js"></script>
</head>
<body>
<div id="app">
    <div>
        <h2>v-if、v-else指令</h2>
        <template v-if="showMsg">
            <p>Hello, my friends</p>
            <p>Welcome!</p>
        </template>
        <template v-else>
            <p>Bad, guys</p>
            <p>Go away</p>
        </template>
    </div>
    <div>
        <h2>v-show指令</h2>
        <p v-show="showCopyright">Copyright @xxx</p>
    </div>
</div>
<script>
    var vm = new Vue({
        el: '#app',
        data: {
            showMsg: true,
            showCopyright: false
        }
    });
</script>
</body>
</html>